<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib uri="http://www.framework.com/taglib" prefix="frame"%>
  <head>
	<title>投标保证金支出 </title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  </head>
  
  <body>
    <div class="easyui-layout" data-options="fit:true,border:false" >
    	<div id="tt" class="easyui-tabs" style="width:1000px;height:630px;">
		    <div title="系统内保证金" style="width:1000px;height:630px;">
		    	<div data-options="region:'center',border:false" style="width:980px;height:530px;">
				    <table id="listProjectsBidTable" class="easyui-datagrid" 
						data-options="singleSelect:false,toolbar:'#goodstb',method:'post',rownumbers:true,fit:true,fitColumns:true,border:true,
							pagination:true,multiSort:true,remoteSort:true,striped:true,onLoadSuccess:function(data){$('#'+projectsParamObj.searchID).attr('disabled',false);},
							url:'${ctx}/business/auctionReport/depositDetailsList?depositType=${depositType }&status=${status }&startTime=${startTime }&stopTime=${stopTime }&className=DepositReturn'">
						<thead>
							<tr>
								<th data-options="field:'projectName',width:80,title:'项目名称',sortable:true" align="center"></th>
								<th data-options="field:'projectCode',width:80,title:'项目编号',sortable:true" align="center"></th>
								<th data-options="field:'projectType',width:80,title:'项目类型',sortable:true" align="center"></th>
								<th data-options="field:'returnTime',width:80,title:'支出时间',sortable:true" align="center"></th>
								<th data-options="field:'tnAmount',width:80,title:'支出金额',sortable:true" align="center"></th>
								<th data-options="field:'pk.companyName',width:80,title:'对方名称',sortable:true,formatter:getCompanyName" align="center"></th>
								<th data-options="field:'inAcct',width:80,title:'对方账号',sortable:true" align="center"></th>
								<th data-options="field:'bankName',width:80,title:'对方开户行',sortable:true" align="center"></th>
							</tr>
						</thead>
					</table>
					<div id="goodstb" style="display: none;">
						<div>
							<a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-export" onclick="excelexportIn()"  plain="true">导出到Excel</a>
						</div>
					</div>
					<!----------------------- wei start --------------------->
					<!--导出Excel -->
					<input type="hidden" id="excel_error" value="${requestScope.excel_error }"/>
					<form action="" id="formIn">
						<input type="hidden" name="depositType" value="${depositType }"/>
						<input type="hidden" name="startTime" value="${startTime }"/>
						<input type="hidden" name="stopTime" value="${stopTime }"/>
						<input type="hidden" name="status" value="${status }"/>
						<input type="hidden" name="className" value="DepositReturn"/>
					</form>
					<script type="text/javascript">
						//导出
						function excelexportIn(){
							$("#formIn").attr("action","${ctx}/business/auctionReport/exportDepositDetails")
							$("#formIn").submit();
			
							var val=$("#excel_error").val();
							if(val!=""){//不为空提示错误消息
								 $.messager.alert("操作提示", val,"error");  
							}
						}
						
				    </script>
					<!----------------------- wei end --------------------->		
				</div>
		    </div>
		    <div title="系统内保证金" style="width:1000px;height:630px;">
		    	<div data-options="region:'center',border:false" style="width:980px;height:530px;">
				    <table id="listProjectsBidTableOut" class="easyui-datagrid" 
						data-options="singleSelect:false,toolbar:'#goodstbOut',method:'post',rownumbers:true,fit:true,fitColumns:true,border:true,
							pagination:true,multiSort:true,remoteSort:true,striped:true,onLoadSuccess:function(data){$('#'+projectsParamObj.searchID).attr('disabled',false);},
							url:'${ctx}/business/auctionReport/depositDetailsList?depositType=${depositType }&status=${status }&startTime=${startTime }&stopTime=${stopTime }&className=DepositReturnOut'">
						<thead>
							<tr>
								<th data-options="field:'projectName',width:80,title:'项目名称',sortable:true" align="center"></th>
								<th data-options="field:'projectCode',width:80,title:'项目编号',sortable:true" align="center"></th>
								<th data-options="field:'projectType',width:80,title:'项目类型',sortable:true" align="center"></th>
								<th data-options="field:'returnTime',width:80,title:'支出时间',sortable:true" align="center"></th>
								<th data-options="field:'tnAmount',width:80,title:'支出金额',sortable:true" align="center"></th>
								<th data-options="field:'pk.companyName',width:80,title:'对方名称',sortable:true,formatter:getCompanyName" align="center"></th>
								<th data-options="field:'inAcct',width:80,title:'对方账号',sortable:true" align="center"></th>
								<th data-options="field:'bankName',width:80,title:'对方开户行',sortable:true" align="center"></th>
							</tr>
						</thead>
					</table>
					<div id="goodstbOut" style="display: none;">
						<div>
							<a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-export" onclick="excelexport()"  plain="true">导出到Excel</a>
						</div>
					</div>
					<!----------------------- wei start --------------------->
					<!--导出Excel -->
					<input type="hidden" id="excel_error" value="${requestScope.excel_error }"/>
					<form action="" id="formOut">
						<input type="hidden" name="depositType" value="${depositType }"/>
						<input type="hidden" name="startTime" value="${startTime }"/>
						<input type="hidden" name="stopTime" value="${stopTime }"/>
						<input type="hidden" name="status" value="${status }"/>
						<input type="hidden" name="className" value="DepositReturnOut"/>
					</form>
					<script type="text/javascript">
						//导出
						function excelexport(){
							$("#formOut").attr("action","${ctx}/business/auctionReport/exportDepositDetails")
							$("#formOut").submit();
			
							var val=$("#excel_error").val();
							if(val!=""){//不为空提示错误消息
								 $.messager.alert("操作提示", val,"error");  
							}
						}
						
				    </script>
					<!----------------------- wei end --------------------->		
				</div>
		    </div>
		</div>
	</div>
	<div id="bindPicDialog"></div>
	<div id="selPicDialog"></div>
	<div id="noCompetReasonDialog"></div>
</body>
	<script type="text/javascript">
		//初始化表格对应的js对象
		var projectsParamObj;
		$(function() {
			//初始化表格对象数据
			projectsParamObj = new initParams(
					{
						paramObjName : 'projectsParamObj',//表格对应的实体对象名称，好区分多个表格情况下的对象
						tableId:'listProjectsTable',
						addDataFormId:'addProjectsDataForm',
						showDialogId:'firstLevelDialog',
						searchID:'searchProjects',
						resetSearchID:'resetsearchProjects',
						searchFormID:'searchProjectsForm',
						updateUrl:"${ctx}/business/projectmanage/input?projectId=",
						deleteUrl:'${ctx}/business/projectmanage/remove',
						addDialogWidth:700,
						addDialogHeight:520,
						ctx:'${ctx}',
						addDialogTitle:'采购项目信息'
					});
			//初始化查询
			init(projectsParamObj);
			//setTimeout(function(){
				//$.parser.parse(".optionsAreas");
			//},1000);
		});
		
		/**
		*显示对方名称
		*/
		function getCompanyName(value, row, index){
			return row.pk.companyName;
		}



		
						
</script>